package 真题;

import java.util.Scanner;

/**
 * @author： li
 * @date： 2022-03-10 12:04
 * @version 1.0
 */
public class 仓库布局 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n,m;
        n=sc.nextInt();
        m=sc.nextInt();
        long a=m-m/6;
        long b=n/3;
        b=n%3==1 ? b+1:b;
        b = n-b;
        System.out.println(a+" "+b);
        long count = a*b;
        sc.close();
        System.out.println(count);
    }
}
